import 'package:finance_app/generated/json/base/json_convert_content.dart';
import 'package:finance_app/generated/json/base/json_field.dart';

class SettingDataImportSummaryListEntity with JsonConvert<SettingDataImportSummaryListEntity> {
  @JSONField(name: "type")
  String type;
  @JSONField(name: "parent_name")
  String parent_name;
  @JSONField(name: "name")
  String name;
  @JSONField(name: "currency_code")
  String currency_code;
  @JSONField(name: "balance")
  dynamic balance;
  @JSONField(name: "Opening Bal (Default Currency)")
  int openingBal;
  @JSONField(name: "key")
  String key;
  @JSONField(name: "line")
  int line;
  @JSONField(name: "issued_at")
  String issued_at;
  @JSONField(name: "default_currency_code")
  String default_currency_code;
  @JSONField(name: "default_balance")
  dynamic default_balance;
  @JSONField(name: "crdr_nature")
  dynamic crdr_nature;
  @JSONField(name: "account_code")
  dynamic account_code;

  SettingDataImportSummaryListEntity(
      {this.type,
      this.parent_name,
      this.crdr_nature,
      this.name,
      this.currency_code,
      this.account_code,
      this.balance,
      this.openingBal,
      this.key,
      this.line,
      this.issued_at,
      this.default_currency_code,
      this.default_balance});

  factory SettingDataImportSummaryListEntity.fromJson(Map<String, dynamic> json) {
    return SettingDataImportSummaryListEntity(
      type: json['type'],
      balance: json['balance'],
      crdr_nature: json['crdr_nature'],
      currency_code: json['currency_code'],
      default_balance: json['default_balance'],
      default_currency_code: json['default_currency_code'],
      issued_at: json['issued_at'],
      account_code: json['account_code'],
      key: json['key'],
      line: json['line'],
      name: json['name'],
      parent_name: json['parent_name'],
      openingBal: json['Opening Bal (Default Currency)'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['Opening Bal (Default Currency)'] = this.openingBal;
    data['balance'] = this.balance;
    data['currency_code'] = this.currency_code;
    data['default_balance'] = this.default_balance;
    data['default_currency_code'] = this.default_currency_code;
    data['issued_at'] = this.issued_at;
    data['key'] = this.key;
    data['crdr_nature'] = this.crdr_nature;
    data['account_code'] = this.account_code;
    data['line'] = this.line;
    data['name'] = this.name;
    data['parent_name'] = this.parent_name;
    data['type'] = this.type;
    return data;
  }
}
